{% extends "base.html" %}

{% block css %}
<link rel = "stylesheet" type = "text/css" href = "/css/login.css" />
{% endblock %}

{% block title %}
        登录 | researchU
{% endblock %}

{% block navigation %}
{% endblock %}

{% block bodycontent %}
	<div class = "signBarContainer">
		<div class = "signBox clearfix">
			<span class = "signBoxContent">
				researchU帮助学生和教师更好的分享与发现学术资源，加速学习进程。
			</span>
		</div>
	</div>
        <div id = "loginFormContainer">
                <div id = "loginFormHeader" class = "clearfix">
                        <h2 class = "headerTitle">researchU 登录</h2>
                </div>
				<form action = "/login/" method = "post">
					<div id = "loginForm">
						<div class = "formRow clearfix">
							<label class = "formRowLabel">{{ form.email.label }}:</label> {{ form.email }}
						</div>
						<div class = "formRow clearfix">
							<label class = "formRowLabel">{{ form.password.label }}:</label> {{ form.password }}
						</div>
						<div class = "persistent clearfix">
							<label class = "formCheckBox">
								<input type = "checkbox" id = "persistentInputCheckBox" />
								<span id = "psersistentLoginText">保持登录状态</span>
							</label>
						</div>
						
						{% if form.email.errors %}
							<div class = "formRow error">
								{{ form.email.errors.0 }}
							</div>
						{% else %}
							{% if form.password.errors %}
								<div class = "formRow error">
									{{ form.password.errors.0 }}
								</div>
							{% endif %}
						{% endif %}
						
						
						<div id = "buttons" class = "formRow clearfix">
							<div id = "loginButton">
								<input value = "登录" name = "login" type = "submit" />
							</div>
							<div id = "registerLink">
								or
								<a href = "/register">
									<span class = "buttonText">注册
									</span>
								</a>
							</div>
						</div>
						
						<div class = "formRow recover clearfix">
							<a href = "/recover/">忘记密码了？</a>
						</div>
					</div>
				</form>
        </div>
{% endblock %}